g_filename_from_uri() might fail; catch the failure and fall back to the
authorEmmanuele Bassi <ebassi@gnome.org>
Wed, 22 Nov 2006 09:12:49 +0000 (09:12 +0000)
committerEmmanuele Bassi <ebassi@src.gnome.org>
Wed, 22 Nov 2006 09:12:49 +0000 (09:12 +0000)
2006-11-21  Emmanuele Bassi  <ebassi@gnome.org>

* gtk/gtkrecentmanager.c:
(get_uri_shortname_for_display): g_filename_from_uri() might
fail; catch the failure and fall back to the non-local URI
case. (#363437)

ChangeLog
gtk/gtkrecentmanager.c

index 0283bd7a7296a291e9f9148bb3e41528b6cb47b6..a3d9241c4c16052604e630c20a739db30706fe9c 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2006-11-21  Emmanuele Bassi  <ebassi@gnome.org>
+
+       * gtk/gtkrecentmanager.c:
+       (get_uri_shortname_for_display): g_filename_from_uri() might
+       fail; catch the failure and fall back to the non-local URI
+       case. (#363437)
+
 2006-11-19  Mark McLoughlin  <mark@skynet.ie>
 
        Fixes bug #376502 - multi-screen support for GtkStatusIcon
index 68ac0de538a7dd9cf871e6ae9fe575f7eea6f00b..d99aefd38b4e3dd3efa2c7c3e6c57934204d1ae3 100644 (file)
@@ -2225,7 +2225,7 @@ get_uri_shortname_for_display (const gchar *uri)
       
       local_file = g_filename_from_uri (uri, NULL, NULL);
       
-      if (local_file != NULL)
+      if (local_file)
         {
           name = g_filename_display_basename (local_file);
           validated = TRUE;
@@ -2233,7 +2233,8 @@ get_uri_shortname_for_display (const gchar *uri)
                
       g_free (local_file);
     } 
-  else
+  
+  if (!name)
     {
       gchar *method;
       gchar *local_file;